define(["app", "angular", "services/BaseService"], function(app, angular) {
	
	var deps = ["$http", "BaseService"];
	
	function auhtorityResource($http, BaseService) {
        return initResource($http, BaseService.restfulUrl + "doubleAuthority/", BaseService.formHeader);
    }
	
	var postHeader = {
	        "Content-Type" : "application/x-www-form-urlencoded;charset=utf-8"
	};
	
	function initResource($http, preUrl,formHeader) {
        return {
        	updateDAuthority: function (chooseUserId,companyCode,chooseType,callTime) {
        		return $http.post(preUrl+"updateDAuthority",{
        			chooseUserId:chooseUserId,
                    companyCode:companyCode,
                    chooseType:chooseType,
                    callTime:callTime
                },{
                    headers: postHeader
                });
			}
        };
        
    }
	auhtorityResource.$inject = deps;
	app.lazy.factory("EditDAuthorityResource", auhtorityResource);
});
